'''
Created on Aug 25, 2011

@author: david
'''

from pspy.gae.actiondomain import PspyAction

class SavePIN(PspyAction):
    """
    Default Action 
    spawns index.gen
    """
    def execute(self): 
        """
        Receive results of scan...
        """
        import logging
        
        req = self.request
        
        pin = req.getParameter("pin")
        did = req.getParameter("did")
        
        req.session[did] = pin
        
        logging.info("~~ saving pin %s for dealer %s" % (pin,did))
        
        return self.JSONOutput("{ 'result': '100::OK'}")
    